package com.genersoft.iot.vmp.conf;

import com.genersoft.iot.vmp.interceptor.SqlInterceptor;
import org.apache.ibatis.session.SqlSessionFactory;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @Description
 * @Author HDaQ
 * @Date 2024/9/10 17:49
 */
@Configuration
public class MybatisInterceptorConfig {
    @Bean
    public String myInterceptor(SqlSessionFactory sqlSessionFactory) {
        sqlSessionFactory.getConfiguration().addInterceptor(new SqlInterceptor());
        return "interceptor";
    }
}
